package org.geom;

public class Maths {

	public static final float PI = (float)Math.PI;
	public static final float TWO_PI = (float)Math.PI*2;
	
	
	public static final float mapProportion(float value,
            float istart, float istop,
            float ostart, float ostop) {
	return ostart + (ostop - ostart) * ((value - istart) / (istop - istart));
	}


	public static float sin(float theta) {
		return (float)Math.sin((float)theta);
	}
	
	public static float cos(float theta) {
		return (float)Math.cos((float)theta);
	}


	public static float random(float max) {
		return (float)(Math.random()*max);
	}


	public static float pow(float a, float b) {
		return (float)Math.pow(a,b);
	}
	

}
